package mjc.egg;
import mjc.compiler.*;
import mjc.gc.*;
import mg.egg.eggc.compiler.libjava.lex.*;
import mg.egg.eggc.compiler.libjava.messages.*;
import mg.egg.eggc.compiler.libjava.*;
import mg.egg.eggc.compiler.libjava.problem.IProblem;
import java.util.Vector;
public class S_Q_MJAVA {
LEX_MJAVA scanner;
  S_Q_MJAVA() {
    }
  S_Q_MJAVA(LEX_MJAVA scanner) {
    this.scanner = scanner;
    this.att_scanner = scanner;
    }
int [] sync= new int[0];
  boolean att_isVariable;
  TDS att_htdsclasses;
  TDS att_htdsvarlocales;
  INFOCLASSE att_hinfoclasse;
  PARAMETRES att_parametres;
  DTYPE att_type;
  LEX_MJAVA att_scanner;
  private void regle73() throws Exception {

    //declaration
    T_MJAVA x_2 = new T_MJAVA(scanner ) ;
    T_MJAVA x_3 = new T_MJAVA(scanner ) ;
    S_Q_MJAVA x_4 = new S_Q_MJAVA(scanner) ;
    //appel
      action_auto_inh_73(x_3, x_4);
    x_2.analyser(LEX_MJAVA.token_pt);
    x_3.analyser(LEX_MJAVA.token_ident);
    x_4.analyser() ;
      action_action_73(x_3, x_4);
  }
  private void regle72() throws Exception {

    //declaration
    //appel
      action_action_72();
  }
  private void regle74() throws Exception {

    //declaration
    T_MJAVA x_2 = new T_MJAVA(scanner ) ;
    S_ARGS_MJAVA x_4 = new S_ARGS_MJAVA(scanner) ;
    T_MJAVA x_5 = new T_MJAVA(scanner ) ;
    S_Q_MJAVA x_6 = new S_Q_MJAVA(scanner) ;
    //appel
      action_auto_inh_74(x_4, x_6);
    x_2.analyser(LEX_MJAVA.token_paro);
      action_milieu_74(x_4, x_6);
    x_4.analyser() ;
    x_5.analyser(LEX_MJAVA.token_parf);
    x_6.analyser() ;
      action_action_74(x_4, x_6);
  }
private void action_auto_inh_74(S_ARGS_MJAVA x_4, S_Q_MJAVA x_6) throws Exception {
try {
// instructions
x_4.att_htdsvarlocales=this.att_htdsvarlocales;
x_6.att_htdsvarlocales=this.att_htdsvarlocales;
x_4.att_htdsclasses=this.att_htdsclasses;
x_6.att_htdsclasses=this.att_htdsclasses;
x_4.att_hinfoclasse=this.att_hinfoclasse;
x_6.att_hinfoclasse=this.att_hinfoclasse;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_auto_inh_73(T_MJAVA x_3, S_Q_MJAVA x_4) throws Exception {
try {
// instructions
x_4.att_htdsvarlocales=this.att_htdsvarlocales;
x_4.att_htdsclasses=this.att_htdsclasses;
x_4.att_hinfoclasse=this.att_hinfoclasse;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_action_72() throws Exception {
try {
// instructions
this.att_type= new DTYPE("void", 0);
this.att_isVariable=true;
this.att_parametres=null;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_action_73(T_MJAVA x_3, S_Q_MJAVA x_4) throws Exception {
try {
// locales
INFO loc_i;
TDS loc_t;
SIGNATURE loc_s;
PARAMETRES loc_p;
// instructions
loc_t=this.att_htdsvarlocales;
if (!(x_4.att_type.compareTo( new DTYPE("argument", 0)))){
loc_i=loc_t.chercherGlobalement(x_3.att_txt);
if (loc_i==null){
att_scanner._interrompre(IProblem.Semantic, att_scanner.getBeginLine(), IMJAVAMessages.id_MJAVA_unknown_token, MJAVAMessages.MJAVA_unknown_token,new Object[]{""+x_3.att_txt});

}
else {
this.att_type=loc_i.getType();
}
}
else {
System.out.print(""+"cas methode\n");
if ((x_4.att_type.compareTo( new DTYPE("argument", 0)))){
loc_s= new SIGNATURE(x_3.att_txt);
    loc_s.getTypesFromParams(x_4.att_parametres);
loc_i=loc_t.chercherGlobalement(loc_s.toString());
if (loc_i==null){
System.out.print(""+">>>>>>>>>>>>>>>> cas méthode 2"+loc_s.toString()+"<<<\n");
att_scanner._interrompre(IProblem.Semantic, att_scanner.getBeginLine(), IMJAVAMessages.id_MJAVA_unknown_token, MJAVAMessages.MJAVA_unknown_token,new Object[]{""+x_3.att_txt});

}
else {
this.att_type=loc_i.getType();
}
}
else {
System.out.print(""+("cas autre"));
this.att_type=x_4.att_type;
}
}
this.att_isVariable=x_4.att_isVariable;
this.att_parametres=x_4.att_parametres;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_action_74(S_ARGS_MJAVA x_4, S_Q_MJAVA x_6) throws Exception {
try {
// instructions
this.att_isVariable=false;
if (x_6.att_type.compareTo( new DTYPE("void", 0))){
this.att_type= new DTYPE("argument", 0);
}
else {
this.att_type=x_6.att_type;
}
this.att_parametres=x_4.att_parametres;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_milieu_74(S_ARGS_MJAVA x_4, S_Q_MJAVA x_6) throws Exception {
try {
// instructions
x_4.att_hnbarg=0;
x_4.att_hparametres= new PARAMETRES();
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
  public void analyser () throws Exception {
    scanner.lit ( 1 ) ;
    switch ( scanner.fenetre[0].code ) {
      case LEX_MJAVA.token_mult : // 19945
        regle72 () ;
      break ;
      case LEX_MJAVA.token_div : // 19946
        regle72 () ;
      break ;
      case LEX_MJAVA.token_mod : // 19947
        regle72 () ;
      break ;
      case LEX_MJAVA.token_et : // 19948
        regle72 () ;
      break ;
      case LEX_MJAVA.token_plus : // 19942
        regle72 () ;
      break ;
      case LEX_MJAVA.token_moins : // 19943
        regle72 () ;
      break ;
      case LEX_MJAVA.token_ou : // 19944
        regle72 () ;
      break ;
      case LEX_MJAVA.token_inf : // 19936
        regle72 () ;
      break ;
      case LEX_MJAVA.token_infeg : // 19937
        regle72 () ;
      break ;
      case LEX_MJAVA.token_sup : // 19938
        regle72 () ;
      break ;
      case LEX_MJAVA.token_supeg : // 19939
        regle72 () ;
      break ;
      case LEX_MJAVA.token_eg : // 19940
        regle72 () ;
      break ;
      case LEX_MJAVA.token_neg : // 19941
        regle72 () ;
      break ;
      case LEX_MJAVA.token_affect : // 19922
        regle72 () ;
      break ;
      case LEX_MJAVA.token_virg : // 19919
        regle72 () ;
      break ;
      case LEX_MJAVA.token_pv : // 19920
        regle72 () ;
      break ;
      case LEX_MJAVA.token_parf : // 19914
        regle72 () ;
      break ;
      case LEX_MJAVA.token_pt : // 19921
        regle73 () ;
      break ;
      case LEX_MJAVA.token_paro : // 19913
        regle74 () ;
      break ;
      default :
               scanner._interrompre(IProblem.Syntax, scanner.getBeginLine(), IMJAVAMessages.id_MJAVA_unexpected_token,MJAVAMessages.MJAVA_unexpected_token,new String[]{scanner.fenetre[0].getNom()});
    }
  }
  }
